/**
 * 
 */
package org.istt.dao;

import java.util.List;

import org.istt.domain.WorkflowProcess;

/**
 * @author NDTHO
 *
 */
public interface WorkflowProcessDao extends Dao<WorkflowProcess, Long> {
	
	//public WorkflowProcess getById(Long id);
	
	//public void updateWfPermission(WorkflowProcess wf);
	
	//public void removeByWorkflow(Workflow workflow);
	
	/**
	 * 
	 * @param fileId
	 * @param nextPos
	 * @param processStatusId
	 * @return
	 */
	public WorkflowProcess getNextStepOfWorkflow(String fileId, Integer nextPos, Long processStatusId);
	
	/**
	 * Get workflow process which was specified as the final step
	 * @param wfpId workflow ID
	 * @return the workflow process
	 */
	WorkflowProcess getFinalStepOfWorkflow(Long wfpId);
	
	/**
	 * Get workflow process which was specified as the first step
	 * @param wfpId workflow ID
	 * @return the workflow process
	 */
	WorkflowProcess getFirstStepOfWorkflow(Long wfpId);
	
	/**
	 * Get the set of workflow processes ordered by its position
	 * @return set of workflow processes
	 */
	List<WorkflowProcess> getWorkflowProcesses(Long workflowId);

}
